import sun.invoke.empty.Empty;

class Solution {
    public int countSegments(String s) {
        String[] ret = s.split(" ");
        int count = 0;
        for (int i = 0; i < ret.length; i++) {
            if(!ret[i].isEmpty()){
                count++;
            }
        }
        return count;
    }
}

public class work {
    public static void main(String[] args) {
        Solution solution = new Solution();
        String s1 = "";
        System.out.println(solution.countSegments(s1));
    }

}
